{% extends "home/common.html" %}
{% block content %}
<div id="mr-mainbody" class="container mr-mainbody">
    <div class="row">
        <!-- //分页显示图书列表 -->
        <div id="mr-content"
             class="mr-content col-xs-12 col-sm-12 col-md-9 col-md-push-3">
            <div id="system-message-container" style="display: none;"></div>
            <div id="mrshop" class="mrshop common-home">
                <div class="container_oc">
                    <ul class="breadcrumb">
                    </ul>
                    <div class="row">
                        <div id="content_oc" class="col-sm-12">
                            <div class="box_oc">
                                <div class="box-content">
                                    <hr>
                                    <div class="row">
                                        {% for item in page_data.items %}
                                        <div class="product-layout product-grid col-lg-3 col-md-3 col-sm-6 col-xs-12">
                                            <div class="product-thumb">
                                                <div class="actions">
                                                    <div class="image">
                                                        <a style="width: 95%"
                                                           href="/goods_detail/{{item.id}}?type={{item.supercat_id}}">
                                                            <img src="{{url_for('static',filename='images/goods/'+item.picture)}}"
                                                                 class="img-responsive"> </a>
                                                    </div>
                                                    <div class="button-group btn-grid">
                                                        <div class="cart">
                                                            <button class="btn btn-primary btn-primary"
                                                                    type="button" data-toggle="tooltip"
                                                                    onclick='javascript:window.location.href="/cart_add/?goods_id={{item.id}}&number=1"; '
                                                                    style="display: none; width: 33.3333%;"
                                                                    data-original-title="添加到购物车">
                                                                <i class="fa fa-shopping-cart"></i>
                                                            </button>
                                                        </div>
                                                        <div class="wishlist">
                                                            <button class="btn" type="button" data-toggle="tooltip"
                                                                    onclick='javascript:window.location.href="/collect_add?goods_id={{item.id}}"; '

                                                                    title="收藏">
                                                                <i class="fa fa-heart"></i>
                                                            </button>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div>
                                                    <div class="caption">
                                                        <div class="name">
                                                            <a href="/goods_detail/{{item.id}}?type={{item.supercat_id}}"
                                                               style="width: 95%">
                                                                <span style="color: #0885B1">名称：</span>{{item.name}}</a>
                                                        </div>

                                                        <p class="price">
                                                            <span class="price-new">分类：</span> <span>{{item.subcat.cat_name}}</span>
                                                            <span class="price-tax">价格: {{item.current_price}}元
																</span>
                                                        </p>
                                                    </div>

                                                </div>
                                            </div>
                                        </div>
                                        {% endfor %}
                                    </div>
                                    <div class="row pagination">
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td height="30" align="right">
                                                    当前页数：[{{page_data.page}}/{{page_data.pages}}]&nbsp;
                                                    <a href="{{ url_for('home.goods_list',page=1,supercat_id=supercat_id) }}">第一页</a>
                                                    {% if page_data.has_prev %}
                                                    <a href="{{ url_for('home.goods_list',page=page_data.prev_num,supercat_id=supercat_id) }}">上一页</a>
                                                    {% endif %}
                                                    {% if page_data.has_next %}
                                                    　 <a
                                                        href="{{ url_for('home.goods_list',page=page_data.next_num,supercat_id=supercat_id) }}">下一页</a>
                                                    {% endif %}　
                                                    <a href="{{ url_for('home.goods_list',page=page_data.pages,supercat_id=supercat_id) }}">最后一页&nbsp;</a>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- //分页显示图书列表 -->
        <!-- 显示左侧热门商品 -->
        <div class="mr-sidebar mr-sidebar-left col-xs-12 col-sm-4 col-sm-pull-8 col-md-3 col-md-pull-9  hidden-sm hidden-xs">
            <div class="mr-module module " id="Mod157">
                <div class="module-inner">
                    <h3 class="module-title ">
                        <span>热门商品</span>
                    </h3>
                    <div class="module-ct">
                        <div class="mrshop">
                            <div class="container_oc">
                                <div class="box_oc">
                                    <div>
                                        <div class="box-product product-grid">
                                            {% for item in hot_goods %}
                                            <div>
                                                <div class="image">
                                                    <a href="/goods_detail/{{item.id}}?type={{item.supercat_id}}">
                                                        <img src="{{url_for('static',filename='images/goods/'+item.picture)}}"
                                                             width="80px">
                                                    </a>
                                                </div>
                                                <div class="name">
                                                    <a href="/goods_detail/{{item.id}}?type={{item.supercat_id}}">
                                                        {{item.name}}</a>
                                                </div>
                                                <div class="rating">
													<span class="fa fa-stack"><i
                                                            class="fa fa-star fa-stack-2x"></i><i
                                                            class="fa fa-star-o fa-stack-2x"></i></span> <span
                                                        class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i
                                                        class="fa fa-star-o fa-stack-2x"></i></span> <span
                                                        class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i
                                                        class="fa fa-star-o fa-stack-2x"></i></span> <span
                                                        class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i
                                                        class="fa fa-star-o fa-stack-2x"></i></span> <span
                                                        class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i
                                                        class="fa fa-star-o fa-stack-2x"></i></span>
                                                </div>
                                                <div class="price">{{item.current_price}}元</div>
                                            </div>
                                            {% endfor %}
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- // 显示左侧热门商品 -->
    </div>
</div>
<!-- 版权栏 -->

{% endblock %}